package com.pencilisland.pay.api.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.pencilisland.pay.api.entity.GoodsImgEntity;

public interface GoodsImgRepository extends CrudRepository<GoodsImgEntity, Long> {

	@Modifying
	@Query("delete from GoodsImgEntity a where a.goodsId=?1")
	void deleteByGoodsId(Long goodsId);

	List<GoodsImgEntity> findByGoodsId(Long goodsId);
}
